package com.zzw.basic.fanxing;

import java.util.ArrayList;
import java.util.List;

public class Canva {

	public static void main(String[] args) {
		List<Circle> list = new ArrayList<Circle>();
		list.add(new Circle());
		Canva c = new Canva();
		c.drawAllold(list);
	}
	
	public void drawAllold(List<?> list){
		for(Object obj:list){
			Shape s = (Shape) obj;
			s.draw(this);
		}
	}
	
	public void drawAll(List<? extends Shape> list){
		for(Shape s:list){
			s.draw(this);
		}
	}
	
	/*public void addShape(List<? extends Shape> list){
		list.add(new Circle());
	}*/
	
}